<template>
  <div id="biji_detail">
    <van-nav-bar
      left-text="返回"
      left-arrow
      @click-left="back"
      :title="data.time"
    />
    <article style="text-indent: 25px">
      {{ data.content }}
    </article>
  </div>
</template>
<script>
export default {
  name: "BiJi_Detail",
  components: {},
  data() {
    return {
      id: 0,
      data: {
        time: "",
        content: "",
      },
    };
  },
  mounted() {
    this.id = this.$route.params.id;
    this.init();
  },
  methods: {
    back(event) {
      this.$router.push("/biji");
    },
    init() {
      this.$api.get("api1", "app/note/" + this.id, null, (r) => {
        this.data.content = r.content;
        this.data.time = r.creationTime;
      });
    },
  },
};
</script>
<style lang="stylus" scoped></style>
